/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * LoggeriFrame.java
 *
 * Created on 18-feb-2009, 9:31:10
 */
package gui;

import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Toolkit;
import util.Logger;

/**
 *
 * Author: Jorge Garrido Oval
 * Colaborated: José Iván Palmer García
 * Ventana que muestra el log de errores.
 */
public class LoggeriFrame extends javax.swing.JInternalFrame {

    /** Creates new form LoggeriFrame */
    public LoggeriFrame() {
        initComponents();
        this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
        this.JLarea.setText(Logger.leerLog());
        this.setCursor(new Cursor(Cursor.HAND_CURSOR));
        Dimension di = Toolkit.getDefaultToolkit().getScreenSize();
        this.setLocation((di.width / 2) - (this.getWidth() / 2), ((di.height / 2) - (this.getHeight() / 2)) / 2);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        JLarea = new javax.swing.JLabel();

        setClosable(true);
        setIconifiable(true);
        setTitle("Ventana de log");
        setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/img/16x16/filesystems/file_broken.png"))); // NOI18N

        jScrollPane1.setAutoscrolls(true);
        jScrollPane1.setViewportView(JLarea);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 527, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel JLarea;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables
}
